package com.guaoran.spring.demo.cyclicdependence;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author gucheng
 * @Description
 *
 *  循环依赖 :
 *      构造注入时，会导致产生循环依赖的情况，
 *      Set注入时，不会
 * 2019-03-12 14:02
 */
@Service
public class BeanB {
    @Autowired
    private BeanA beanA;

    public void testB(){
        System.out.println("BeanB test...");
        beanA.testA();
    }
}
